package com.gaohe.official.service.impl;

import java.util.List;
import com.gaohe.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gaohe.official.mapper.FmUserCommunityMapper;
import com.gaohe.official.domain.FmUserCommunity;
import com.gaohe.official.service.IFmUserCommunityService;

/**
 * 用户圈子Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-03
 */
@Service
public class FmUserCommunityServiceImpl implements IFmUserCommunityService 
{
    @Autowired
    private FmUserCommunityMapper fmUserCommunityMapper;

    /**
     * 查询用户圈子
     * 
     * @param userCommunityId 用户圈子主键
     * @return 用户圈子
     */
    @Override
    public FmUserCommunity selectFmUserCommunityByUserCommunityId(Long userCommunityId)
    {
        return fmUserCommunityMapper.selectFmUserCommunityByUserCommunityId(userCommunityId);
    }

    /**
     * 查询用户圈子列表
     * 
     * @param fmUserCommunity 用户圈子
     * @return 用户圈子
     */
    @Override
    public List<FmUserCommunity> selectFmUserCommunityList(FmUserCommunity fmUserCommunity)
    {
        return fmUserCommunityMapper.selectFmUserCommunityList(fmUserCommunity);
    }

    /**
     * 新增用户圈子
     * 
     * @param fmUserCommunity 用户圈子
     * @return 结果
     */
    @Override
    public int insertFmUserCommunity(FmUserCommunity fmUserCommunity)
    {
        fmUserCommunity.setCreateTime(DateUtils.getNowDate());
        return fmUserCommunityMapper.insertFmUserCommunity(fmUserCommunity);
    }

    /**
     * 修改用户圈子
     * 
     * @param fmUserCommunity 用户圈子
     * @return 结果
     */
    @Override
    public int updateFmUserCommunity(FmUserCommunity fmUserCommunity)
    {
        fmUserCommunity.setUpdateTime(DateUtils.getNowDate());
        return fmUserCommunityMapper.updateFmUserCommunity(fmUserCommunity);
    }

    /**
     * 批量删除用户圈子
     * 
     * @param userCommunityIds 需要删除的用户圈子主键
     * @return 结果
     */
    @Override
    public int deleteFmUserCommunityByUserCommunityIds(Long[] userCommunityIds)
    {
        return fmUserCommunityMapper.deleteFmUserCommunityByUserCommunityIds(userCommunityIds);
    }

    /**
     * 删除用户圈子信息
     * 
     * @param userCommunityId 用户圈子主键
     * @return 结果
     */
    @Override
    public int deleteFmUserCommunityByUserCommunityId(Long userCommunityId)
    {
        return fmUserCommunityMapper.deleteFmUserCommunityByUserCommunityId(userCommunityId);
    }
}
